<?php


abstract class BaseUcMembers extends BaseObject  implements Persistent {


	
	protected static $peer;


	
	protected $uid;


	
	protected $username;


	
	protected $password;


	
	protected $email;


	
	protected $myid;


	
	protected $myidkey;


	
	protected $regip;


	
	protected $regdate;


	
	protected $lastloginip;


	
	protected $lastlogintime;


	
	protected $salt;


	
	protected $secques;

	
	protected $collSceneSpots;

	
	protected $lastSceneSpotCriteria = null;

	
	protected $collEaterys;

	
	protected $lastEateryCriteria = null;

	
	protected $collFoods;

	
	protected $lastFoodCriteria = null;

	
	protected $collMethods;

	
	protected $lastMethodCriteria = null;

	
	protected $collCommentss;

	
	protected $lastCommentsCriteria = null;

	
	protected $collTongs;

	
	protected $lastTongCriteria = null;

	
	protected $collTongMembers;

	
	protected $lastTongMemberCriteria = null;

	
	protected $collTongTopics;

	
	protected $lastTongTopicCriteria = null;

	
	protected $collGallerys;

	
	protected $lastGalleryCriteria = null;

	
	protected $collGalleryPhotoss;

	
	protected $lastGalleryPhotosCriteria = null;

	
	protected $collVisitRecords;

	
	protected $lastVisitRecordCriteria = null;

	
	protected $alreadyInSave = false;

	
	protected $alreadyInValidation = false;

	
	public function getUid()
	{

		return $this->uid;
	}

	
	public function getUsername()
	{

		return $this->username;
	}

	
	public function getPassword()
	{

		return $this->password;
	}

	
	public function getEmail()
	{

		return $this->email;
	}

	
	public function getMyid()
	{

		return $this->myid;
	}

	
	public function getMyidkey()
	{

		return $this->myidkey;
	}

	
	public function getRegip()
	{

		return $this->regip;
	}

	
	public function getRegdate()
	{

		return $this->regdate;
	}

	
	public function getLastloginip()
	{

		return $this->lastloginip;
	}

	
	public function getLastlogintime()
	{

		return $this->lastlogintime;
	}

	
	public function getSalt()
	{

		return $this->salt;
	}

	
	public function getSecques()
	{

		return $this->secques;
	}

	
	public function setUid($v)
	{

		
		
		if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->uid !== $v) {
			$this->uid = $v;
			$this->modifiedColumns[] = UcMembersPeer::UID;
		}

	} 
	
	public function setUsername($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->username !== $v) {
			$this->username = $v;
			$this->modifiedColumns[] = UcMembersPeer::USERNAME;
		}

	} 
	
	public function setPassword($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->password !== $v) {
			$this->password = $v;
			$this->modifiedColumns[] = UcMembersPeer::PASSWORD;
		}

	} 
	
	public function setEmail($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->email !== $v) {
			$this->email = $v;
			$this->modifiedColumns[] = UcMembersPeer::EMAIL;
		}

	} 
	
	public function setMyid($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->myid !== $v) {
			$this->myid = $v;
			$this->modifiedColumns[] = UcMembersPeer::MYID;
		}

	} 
	
	public function setMyidkey($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->myidkey !== $v) {
			$this->myidkey = $v;
			$this->modifiedColumns[] = UcMembersPeer::MYIDKEY;
		}

	} 
	
	public function setRegip($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->regip !== $v) {
			$this->regip = $v;
			$this->modifiedColumns[] = UcMembersPeer::REGIP;
		}

	} 
	
	public function setRegdate($v)
	{

		
		
		if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->regdate !== $v) {
			$this->regdate = $v;
			$this->modifiedColumns[] = UcMembersPeer::REGDATE;
		}

	} 
	
	public function setLastloginip($v)
	{

		
		
		if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->lastloginip !== $v) {
			$this->lastloginip = $v;
			$this->modifiedColumns[] = UcMembersPeer::LASTLOGINIP;
		}

	} 
	
	public function setLastlogintime($v)
	{

		
		
		if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->lastlogintime !== $v) {
			$this->lastlogintime = $v;
			$this->modifiedColumns[] = UcMembersPeer::LASTLOGINTIME;
		}

	} 
	
	public function setSalt($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->salt !== $v) {
			$this->salt = $v;
			$this->modifiedColumns[] = UcMembersPeer::SALT;
		}

	} 
	
	public function setSecques($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->secques !== $v) {
			$this->secques = $v;
			$this->modifiedColumns[] = UcMembersPeer::SECQUES;
		}

	} 
	
	public function hydrate(ResultSet $rs, $startcol = 1)
	{
		try {

			$this->uid = $rs->getInt($startcol + 0);

			$this->username = $rs->getString($startcol + 1);

			$this->password = $rs->getString($startcol + 2);

			$this->email = $rs->getString($startcol + 3);

			$this->myid = $rs->getString($startcol + 4);

			$this->myidkey = $rs->getString($startcol + 5);

			$this->regip = $rs->getString($startcol + 6);

			$this->regdate = $rs->getInt($startcol + 7);

			$this->lastloginip = $rs->getInt($startcol + 8);

			$this->lastlogintime = $rs->getInt($startcol + 9);

			$this->salt = $rs->getString($startcol + 10);

			$this->secques = $rs->getString($startcol + 11);

			$this->resetModified();

			$this->setNew(false);

						return $startcol + 12; 
		} catch (Exception $e) {
			throw new PropelException("Error populating UcMembers object", $e);
		}
	}

	
	public function delete($con = null)
	{
		if ($this->isDeleted()) {
			throw new PropelException("This object has already been deleted.");
		}

		if ($con === null) {
			$con = Propel::getConnection(UcMembersPeer::DATABASE_NAME);
		}

		try {
			$con->begin();
			UcMembersPeer::doDelete($this, $con);
			$this->setDeleted(true);
			$con->commit();
		} catch (PropelException $e) {
			$con->rollback();
			throw $e;
		}
	}

	
	public function save($con = null)
	{
		if ($this->isDeleted()) {
			throw new PropelException("You cannot save an object that has been deleted.");
		}

		if ($con === null) {
			$con = Propel::getConnection(UcMembersPeer::DATABASE_NAME);
		}

		try {
			$con->begin();
			$affectedRows = $this->doSave($con);
			$con->commit();
			return $affectedRows;
		} catch (PropelException $e) {
			$con->rollback();
			throw $e;
		}
	}

	
	protected function doSave($con)
	{
		$affectedRows = 0; 		if (!$this->alreadyInSave) {
			$this->alreadyInSave = true;


						if ($this->isModified()) {
				if ($this->isNew()) {
					$pk = UcMembersPeer::doInsert($this, $con);
					$affectedRows += 1; 										 										 
					$this->setUid($pk);  
					$this->setNew(false);
				} else {
					$affectedRows += UcMembersPeer::doUpdate($this, $con);
				}
				$this->resetModified(); 			}

			if ($this->collSceneSpots !== null) {
				foreach($this->collSceneSpots as $referrerFK) {
					if (!$referrerFK->isDeleted()) {
						$affectedRows += $referrerFK->save($con);
					}
				}
			}

			if ($this->collEaterys !== null) {
				foreach($this->collEaterys as $referrerFK) {
					if (!$referrerFK->isDeleted()) {
						$affectedRows += $referrerFK->save($con);
					}
				}
			}

			if ($this->collFoods !== null) {
				foreach($this->collFoods as $referrerFK) {
					if (!$referrerFK->isDeleted()) {
						$affectedRows += $referrerFK->save($con);
					}
				}
			}

			if ($this->collMethods !== null) {
				foreach($this->collMethods as $referrerFK) {
					if (!$referrerFK->isDeleted()) {
						$affectedRows += $referrerFK->save($con);
					}
				}
			}

			if ($this->collCommentss !== null) {
				foreach($this->collCommentss as $referrerFK) {
					if (!$referrerFK->isDeleted()) {
						$affectedRows += $referrerFK->save($con);
					}
				}
			}

			if ($this->collTongs !== null) {
				foreach($this->collTongs as $referrerFK) {
					if (!$referrerFK->isDeleted()) {
						$affectedRows += $referrerFK->save($con);
					}
				}
			}

			if ($this->collTongMembers !== null) {
				foreach($this->collTongMembers as $referrerFK) {
					if (!$referrerFK->isDeleted()) {
						$affectedRows += $referrerFK->save($con);
					}
				}
			}

			if ($this->collTongTopics !== null) {
				foreach($this->collTongTopics as $referrerFK) {
					if (!$referrerFK->isDeleted()) {
						$affectedRows += $referrerFK->save($con);
					}
				}
			}

			if ($this->collGallerys !== null) {
				foreach($this->collGallerys as $referrerFK) {
					if (!$referrerFK->isDeleted()) {
						$affectedRows += $referrerFK->save($con);
					}
				}
			}

			if ($this->collGalleryPhotoss !== null) {
				foreach($this->collGalleryPhotoss as $referrerFK) {
					if (!$referrerFK->isDeleted()) {
						$affectedRows += $referrerFK->save($con);
					}
				}
			}

			if ($this->collVisitRecords !== null) {
				foreach($this->collVisitRecords as $referrerFK) {
					if (!$referrerFK->isDeleted()) {
						$affectedRows += $referrerFK->save($con);
					}
				}
			}

			$this->alreadyInSave = false;
		}
		return $affectedRows;
	} 
	
	protected $validationFailures = array();

	
	public function getValidationFailures()
	{
		return $this->validationFailures;
	}

	
	public function validate($columns = null)
	{
		$res = $this->doValidate($columns);
		if ($res === true) {
			$this->validationFailures = array();
			return true;
		} else {
			$this->validationFailures = $res;
			return false;
		}
	}

	
	protected function doValidate($columns = null)
	{
		if (!$this->alreadyInValidation) {
			$this->alreadyInValidation = true;
			$retval = null;

			$failureMap = array();


			if (($retval = UcMembersPeer::doValidate($this, $columns)) !== true) {
				$failureMap = array_merge($failureMap, $retval);
			}


				if ($this->collSceneSpots !== null) {
					foreach($this->collSceneSpots as $referrerFK) {
						if (!$referrerFK->validate($columns)) {
							$failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
						}
					}
				}

				if ($this->collEaterys !== null) {
					foreach($this->collEaterys as $referrerFK) {
						if (!$referrerFK->validate($columns)) {
							$failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
						}
					}
				}

				if ($this->collFoods !== null) {
					foreach($this->collFoods as $referrerFK) {
						if (!$referrerFK->validate($columns)) {
							$failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
						}
					}
				}

				if ($this->collMethods !== null) {
					foreach($this->collMethods as $referrerFK) {
						if (!$referrerFK->validate($columns)) {
							$failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
						}
					}
				}

				if ($this->collCommentss !== null) {
					foreach($this->collCommentss as $referrerFK) {
						if (!$referrerFK->validate($columns)) {
							$failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
						}
					}
				}

				if ($this->collTongs !== null) {
					foreach($this->collTongs as $referrerFK) {
						if (!$referrerFK->validate($columns)) {
							$failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
						}
					}
				}

				if ($this->collTongMembers !== null) {
					foreach($this->collTongMembers as $referrerFK) {
						if (!$referrerFK->validate($columns)) {
							$failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
						}
					}
				}

				if ($this->collTongTopics !== null) {
					foreach($this->collTongTopics as $referrerFK) {
						if (!$referrerFK->validate($columns)) {
							$failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
						}
					}
				}

				if ($this->collGallerys !== null) {
					foreach($this->collGallerys as $referrerFK) {
						if (!$referrerFK->validate($columns)) {
							$failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
						}
					}
				}

				if ($this->collGalleryPhotoss !== null) {
					foreach($this->collGalleryPhotoss as $referrerFK) {
						if (!$referrerFK->validate($columns)) {
							$failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
						}
					}
				}

				if ($this->collVisitRecords !== null) {
					foreach($this->collVisitRecords as $referrerFK) {
						if (!$referrerFK->validate($columns)) {
							$failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
						}
					}
				}


			$this->alreadyInValidation = false;
		}

		return (!empty($failureMap) ? $failureMap : true);
	}

	
	public function getByName($name, $type = BasePeer::TYPE_PHPNAME)
	{
		$pos = UcMembersPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
		return $this->getByPosition($pos);
	}

	
	public function getByPosition($pos)
	{
		switch($pos) {
			case 0:
				return $this->getUid();
				break;
			case 1:
				return $this->getUsername();
				break;
			case 2:
				return $this->getPassword();
				break;
			case 3:
				return $this->getEmail();
				break;
			case 4:
				return $this->getMyid();
				break;
			case 5:
				return $this->getMyidkey();
				break;
			case 6:
				return $this->getRegip();
				break;
			case 7:
				return $this->getRegdate();
				break;
			case 8:
				return $this->getLastloginip();
				break;
			case 9:
				return $this->getLastlogintime();
				break;
			case 10:
				return $this->getSalt();
				break;
			case 11:
				return $this->getSecques();
				break;
			default:
				return null;
				break;
		} 	}

	
	public function toArray($keyType = BasePeer::TYPE_PHPNAME)
	{
		$keys = UcMembersPeer::getFieldNames($keyType);
		$result = array(
			$keys[0] => $this->getUid(),
			$keys[1] => $this->getUsername(),
			$keys[2] => $this->getPassword(),
			$keys[3] => $this->getEmail(),
			$keys[4] => $this->getMyid(),
			$keys[5] => $this->getMyidkey(),
			$keys[6] => $this->getRegip(),
			$keys[7] => $this->getRegdate(),
			$keys[8] => $this->getLastloginip(),
			$keys[9] => $this->getLastlogintime(),
			$keys[10] => $this->getSalt(),
			$keys[11] => $this->getSecques(),
		);
		return $result;
	}

	
	public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME)
	{
		$pos = UcMembersPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
		return $this->setByPosition($pos, $value);
	}

	
	public function setByPosition($pos, $value)
	{
		switch($pos) {
			case 0:
				$this->setUid($value);
				break;
			case 1:
				$this->setUsername($value);
				break;
			case 2:
				$this->setPassword($value);
				break;
			case 3:
				$this->setEmail($value);
				break;
			case 4:
				$this->setMyid($value);
				break;
			case 5:
				$this->setMyidkey($value);
				break;
			case 6:
				$this->setRegip($value);
				break;
			case 7:
				$this->setRegdate($value);
				break;
			case 8:
				$this->setLastloginip($value);
				break;
			case 9:
				$this->setLastlogintime($value);
				break;
			case 10:
				$this->setSalt($value);
				break;
			case 11:
				$this->setSecques($value);
				break;
		} 	}

	
	public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
	{
		$keys = UcMembersPeer::getFieldNames($keyType);

		if (array_key_exists($keys[0], $arr)) $this->setUid($arr[$keys[0]]);
		if (array_key_exists($keys[1], $arr)) $this->setUsername($arr[$keys[1]]);
		if (array_key_exists($keys[2], $arr)) $this->setPassword($arr[$keys[2]]);
		if (array_key_exists($keys[3], $arr)) $this->setEmail($arr[$keys[3]]);
		if (array_key_exists($keys[4], $arr)) $this->setMyid($arr[$keys[4]]);
		if (array_key_exists($keys[5], $arr)) $this->setMyidkey($arr[$keys[5]]);
		if (array_key_exists($keys[6], $arr)) $this->setRegip($arr[$keys[6]]);
		if (array_key_exists($keys[7], $arr)) $this->setRegdate($arr[$keys[7]]);
		if (array_key_exists($keys[8], $arr)) $this->setLastloginip($arr[$keys[8]]);
		if (array_key_exists($keys[9], $arr)) $this->setLastlogintime($arr[$keys[9]]);
		if (array_key_exists($keys[10], $arr)) $this->setSalt($arr[$keys[10]]);
		if (array_key_exists($keys[11], $arr)) $this->setSecques($arr[$keys[11]]);
	}

	
	public function buildCriteria()
	{
		$criteria = new Criteria(UcMembersPeer::DATABASE_NAME);

		if ($this->isColumnModified(UcMembersPeer::UID)) $criteria->add(UcMembersPeer::UID, $this->uid);
		if ($this->isColumnModified(UcMembersPeer::USERNAME)) $criteria->add(UcMembersPeer::USERNAME, $this->username);
		if ($this->isColumnModified(UcMembersPeer::PASSWORD)) $criteria->add(UcMembersPeer::PASSWORD, $this->password);
		if ($this->isColumnModified(UcMembersPeer::EMAIL)) $criteria->add(UcMembersPeer::EMAIL, $this->email);
		if ($this->isColumnModified(UcMembersPeer::MYID)) $criteria->add(UcMembersPeer::MYID, $this->myid);
		if ($this->isColumnModified(UcMembersPeer::MYIDKEY)) $criteria->add(UcMembersPeer::MYIDKEY, $this->myidkey);
		if ($this->isColumnModified(UcMembersPeer::REGIP)) $criteria->add(UcMembersPeer::REGIP, $this->regip);
		if ($this->isColumnModified(UcMembersPeer::REGDATE)) $criteria->add(UcMembersPeer::REGDATE, $this->regdate);
		if ($this->isColumnModified(UcMembersPeer::LASTLOGINIP)) $criteria->add(UcMembersPeer::LASTLOGINIP, $this->lastloginip);
		if ($this->isColumnModified(UcMembersPeer::LASTLOGINTIME)) $criteria->add(UcMembersPeer::LASTLOGINTIME, $this->lastlogintime);
		if ($this->isColumnModified(UcMembersPeer::SALT)) $criteria->add(UcMembersPeer::SALT, $this->salt);
		if ($this->isColumnModified(UcMembersPeer::SECQUES)) $criteria->add(UcMembersPeer::SECQUES, $this->secques);

		return $criteria;
	}

	
	public function buildPkeyCriteria()
	{
		$criteria = new Criteria(UcMembersPeer::DATABASE_NAME);

		$criteria->add(UcMembersPeer::UID, $this->uid);

		return $criteria;
	}

	
	public function getPrimaryKey()
	{
		return $this->getUid();
	}

	
	public function setPrimaryKey($key)
	{
		$this->setUid($key);
	}

	
	public function copyInto($copyObj, $deepCopy = false)
	{

		$copyObj->setUsername($this->username);

		$copyObj->setPassword($this->password);

		$copyObj->setEmail($this->email);

		$copyObj->setMyid($this->myid);

		$copyObj->setMyidkey($this->myidkey);

		$copyObj->setRegip($this->regip);

		$copyObj->setRegdate($this->regdate);

		$copyObj->setLastloginip($this->lastloginip);

		$copyObj->setLastlogintime($this->lastlogintime);

		$copyObj->setSalt($this->salt);

		$copyObj->setSecques($this->secques);


		if ($deepCopy) {
									$copyObj->setNew(false);

			foreach($this->getSceneSpots() as $relObj) {
				$copyObj->addSceneSpot($relObj->copy($deepCopy));
			}

			foreach($this->getEaterys() as $relObj) {
				$copyObj->addEatery($relObj->copy($deepCopy));
			}

			foreach($this->getFoods() as $relObj) {
				$copyObj->addFood($relObj->copy($deepCopy));
			}

			foreach($this->getMethods() as $relObj) {
				$copyObj->addMethod($relObj->copy($deepCopy));
			}

			foreach($this->getCommentss() as $relObj) {
				$copyObj->addComments($relObj->copy($deepCopy));
			}

			foreach($this->getTongs() as $relObj) {
				$copyObj->addTong($relObj->copy($deepCopy));
			}

			foreach($this->getTongMembers() as $relObj) {
				$copyObj->addTongMember($relObj->copy($deepCopy));
			}

			foreach($this->getTongTopics() as $relObj) {
				$copyObj->addTongTopic($relObj->copy($deepCopy));
			}

			foreach($this->getGallerys() as $relObj) {
				$copyObj->addGallery($relObj->copy($deepCopy));
			}

			foreach($this->getGalleryPhotoss() as $relObj) {
				$copyObj->addGalleryPhotos($relObj->copy($deepCopy));
			}

			foreach($this->getVisitRecords() as $relObj) {
				$copyObj->addVisitRecord($relObj->copy($deepCopy));
			}

		} 

		$copyObj->setNew(true);

		$copyObj->setUid(NULL); 
	}

	
	public function copy($deepCopy = false)
	{
				$clazz = get_class($this);
		$copyObj = new $clazz();
		$this->copyInto($copyObj, $deepCopy);
		return $copyObj;
	}

	
	public function getPeer()
	{
		if (self::$peer === null) {
			self::$peer = new UcMembersPeer();
		}
		return self::$peer;
	}

	
	public function initSceneSpots()
	{
		if ($this->collSceneSpots === null) {
			$this->collSceneSpots = array();
		}
	}

	
	public function getSceneSpots($criteria = null, $con = null)
	{
				include_once 'lib/model/om/BaseSceneSpotPeer.php';
		if ($criteria === null) {
			$criteria = new Criteria();
		}
		elseif ($criteria instanceof Criteria)
		{
			$criteria = clone $criteria;
		}

		if ($this->collSceneSpots === null) {
			if ($this->isNew()) {
			   $this->collSceneSpots = array();
			} else {

				$criteria->add(SceneSpotPeer::USER_ID, $this->getUid());

				SceneSpotPeer::addSelectColumns($criteria);
				$this->collSceneSpots = SceneSpotPeer::doSelect($criteria, $con);
			}
		} else {
						if (!$this->isNew()) {
												

				$criteria->add(SceneSpotPeer::USER_ID, $this->getUid());

				SceneSpotPeer::addSelectColumns($criteria);
				if (!isset($this->lastSceneSpotCriteria) || !$this->lastSceneSpotCriteria->equals($criteria)) {
					$this->collSceneSpots = SceneSpotPeer::doSelect($criteria, $con);
				}
			}
		}
		$this->lastSceneSpotCriteria = $criteria;
		return $this->collSceneSpots;
	}

	
	public function countSceneSpots($criteria = null, $distinct = false, $con = null)
	{
				include_once 'lib/model/om/BaseSceneSpotPeer.php';
		if ($criteria === null) {
			$criteria = new Criteria();
		}
		elseif ($criteria instanceof Criteria)
		{
			$criteria = clone $criteria;
		}

		$criteria->add(SceneSpotPeer::USER_ID, $this->getUid());

		return SceneSpotPeer::doCount($criteria, $distinct, $con);
	}

	
	public function addSceneSpot(SceneSpot $l)
	{
		$this->collSceneSpots[] = $l;
		$l->setUcMembers($this);
	}


	
	public function getSceneSpotsJoinScene($criteria = null, $con = null)
	{
				include_once 'lib/model/om/BaseSceneSpotPeer.php';
		if ($criteria === null) {
			$criteria = new Criteria();
		}
		elseif ($criteria instanceof Criteria)
		{
			$criteria = clone $criteria;
		}

		if ($this->collSceneSpots === null) {
			if ($this->isNew()) {
				$this->collSceneSpots = array();
			} else {

				$criteria->add(SceneSpotPeer::USER_ID, $this->getUid());

				$this->collSceneSpots = SceneSpotPeer::doSelectJoinScene($criteria, $con);
			}
		} else {
									
			$criteria->add(SceneSpotPeer::USER_ID, $this->getUid());

			if (!isset($this->lastSceneSpotCriteria) || !$this->lastSceneSpotCriteria->equals($criteria)) {
				$this->collSceneSpots = SceneSpotPeer::doSelectJoinScene($criteria, $con);
			}
		}
		$this->lastSceneSpotCriteria = $criteria;

		return $this->collSceneSpots;
	}

	
	public function initEaterys()
	{
		if ($this->collEaterys === null) {
			$this->collEaterys = array();
		}
	}

	
	public function getEaterys($criteria = null, $con = null)
	{
				include_once 'lib/model/om/BaseEateryPeer.php';
		if ($criteria === null) {
			$criteria = new Criteria();
		}
		elseif ($criteria instanceof Criteria)
		{
			$criteria = clone $criteria;
		}

		if ($this->collEaterys === null) {
			if ($this->isNew()) {
			   $this->collEaterys = array();
			} else {

				$criteria->add(EateryPeer::USER_ID, $this->getUid());

				EateryPeer::addSelectColumns($criteria);
				$this->collEaterys = EateryPeer::doSelect($criteria, $con);
			}
		} else {
						if (!$this->isNew()) {
												

				$criteria->add(EateryPeer::USER_ID, $this->getUid());

				EateryPeer::addSelectColumns($criteria);
				if (!isset($this->lastEateryCriteria) || !$this->lastEateryCriteria->equals($criteria)) {
					$this->collEaterys = EateryPeer::doSelect($criteria, $con);
				}
			}
		}
		$this->lastEateryCriteria = $criteria;
		return $this->collEaterys;
	}

	
	public function countEaterys($criteria = null, $distinct = false, $con = null)
	{
				include_once 'lib/model/om/BaseEateryPeer.php';
		if ($criteria === null) {
			$criteria = new Criteria();
		}
		elseif ($criteria instanceof Criteria)
		{
			$criteria = clone $criteria;
		}

		$criteria->add(EateryPeer::USER_ID, $this->getUid());

		return EateryPeer::doCount($criteria, $distinct, $con);
	}

	
	public function addEatery(Eatery $l)
	{
		$this->collEaterys[] = $l;
		$l->setUcMembers($this);
	}


	
	public function getEaterysJoinScene($criteria = null, $con = null)
	{
				include_once 'lib/model/om/BaseEateryPeer.php';
		if ($criteria === null) {
			$criteria = new Criteria();
		}
		elseif ($criteria instanceof Criteria)
		{
			$criteria = clone $criteria;
		}

		if ($this->collEaterys === null) {
			if ($this->isNew()) {
				$this->collEaterys = array();
			} else {

				$criteria->add(EateryPeer::USER_ID, $this->getUid());

				$this->collEaterys = EateryPeer::doSelectJoinScene($criteria, $con);
			}
		} else {
									
			$criteria->add(EateryPeer::USER_ID, $this->getUid());

			if (!isset($this->lastEateryCriteria) || !$this->lastEateryCriteria->equals($criteria)) {
				$this->collEaterys = EateryPeer::doSelectJoinScene($criteria, $con);
			}
		}
		$this->lastEateryCriteria = $criteria;

		return $this->collEaterys;
	}

	
	public function initFoods()
	{
		if ($this->collFoods === null) {
			$this->collFoods = array();
		}
	}

	
	public function getFoods($criteria = null, $con = null)
	{
				include_once 'lib/model/om/BaseFoodPeer.php';
		if ($criteria === null) {
			$criteria = new Criteria();
		}
		elseif ($criteria instanceof Criteria)
		{
			$criteria = clone $criteria;
		}

		if ($this->collFoods === null) {
			if ($this->isNew()) {
			   $this->collFoods = array();
			} else {

				$criteria->add(FoodPeer::USER_ID, $this->getUid());

				FoodPeer::addSelectColumns($criteria);
				$this->collFoods = FoodPeer::doSelect($criteria, $con);
			}
		} else {
						if (!$this->isNew()) {
												

				$criteria->add(FoodPeer::USER_ID, $this->getUid());

				FoodPeer::addSelectColumns($criteria);
				if (!isset($this->lastFoodCriteria) || !$this->lastFoodCriteria->equals($criteria)) {
					$this->collFoods = FoodPeer::doSelect($criteria, $con);
				}
			}
		}
		$this->lastFoodCriteria = $criteria;
		return $this->collFoods;
	}

	
	public function countFoods($criteria = null, $distinct = false, $con = null)
	{
				include_once 'lib/model/om/BaseFoodPeer.php';
		if ($criteria === null) {
			$criteria = new Criteria();
		}
		elseif ($criteria instanceof Criteria)
		{
			$criteria = clone $criteria;
		}

		$criteria->add(FoodPeer::USER_ID, $this->getUid());

		return FoodPeer::doCount($criteria, $distinct, $con);
	}

	
	public function addFood(Food $l)
	{
		$this->collFoods[] = $l;
		$l->setUcMembers($this);
	}

	
	public function initMethods()
	{
		if ($this->collMethods === null) {
			$this->collMethods = array();
		}
	}

	
	public function getMethods($criteria = null, $con = null)
	{
				include_once 'lib/model/om/BaseMethodPeer.php';
		if ($criteria === null) {
			$criteria = new Criteria();
		}
		elseif ($criteria instanceof Criteria)
		{
			$criteria = clone $criteria;
		}

		if ($this->collMethods === null) {
			if ($this->isNew()) {
			   $this->collMethods = array();
			} else {

				$criteria->add(MethodPeer::USER_ID, $this->getUid());

				MethodPeer::addSelectColumns($criteria);
				$this->collMethods = MethodPeer::doSelect($criteria, $con);
			}
		} else {
						if (!$this->isNew()) {
												

				$criteria->add(MethodPeer::USER_ID, $this->getUid());

				MethodPeer::addSelectColumns($criteria);
				if (!isset($this->lastMethodCriteria) || !$this->lastMethodCriteria->equals($criteria)) {
					$this->collMethods = MethodPeer::doSelect($criteria, $con);
				}
			}
		}
		$this->lastMethodCriteria = $criteria;
		return $this->collMethods;
	}

	
	public function countMethods($criteria = null, $distinct = false, $con = null)
	{
				include_once 'lib/model/om/BaseMethodPeer.php';
		if ($criteria === null) {
			$criteria = new Criteria();
		}
		elseif ($criteria instanceof Criteria)
		{
			$criteria = clone $criteria;
		}

		$criteria->add(MethodPeer::USER_ID, $this->getUid());

		return MethodPeer::doCount($criteria, $distinct, $con);
	}

	
	public function addMethod(Method $l)
	{
		$this->collMethods[] = $l;
		$l->setUcMembers($this);
	}


	
	public function getMethodsJoinFood($criteria = null, $con = null)
	{
				include_once 'lib/model/om/BaseMethodPeer.php';
		if ($criteria === null) {
			$criteria = new Criteria();
		}
		elseif ($criteria instanceof Criteria)
		{
			$criteria = clone $criteria;
		}

		if ($this->collMethods === null) {
			if ($this->isNew()) {
				$this->collMethods = array();
			} else {

				$criteria->add(MethodPeer::USER_ID, $this->getUid());

				$this->collMethods = MethodPeer::doSelectJoinFood($criteria, $con);
			}
		} else {
									
			$criteria->add(MethodPeer::USER_ID, $this->getUid());

			if (!isset($this->lastMethodCriteria) || !$this->lastMethodCriteria->equals($criteria)) {
				$this->collMethods = MethodPeer::doSelectJoinFood($criteria, $con);
			}
		}
		$this->lastMethodCriteria = $criteria;

		return $this->collMethods;
	}

	
	public function initCommentss()
	{
		if ($this->collCommentss === null) {
			$this->collCommentss = array();
		}
	}

	
	public function getCommentss($criteria = null, $con = null)
	{
				include_once 'lib/model/om/BaseCommentsPeer.php';
		if ($criteria === null) {
			$criteria = new Criteria();
		}
		elseif ($criteria instanceof Criteria)
		{
			$criteria = clone $criteria;
		}

		if ($this->collCommentss === null) {
			if ($this->isNew()) {
			   $this->collCommentss = array();
			} else {

				$criteria->add(CommentsPeer::USER_ID, $this->getUid());

				CommentsPeer::addSelectColumns($criteria);
				$this->collCommentss = CommentsPeer::doSelect($criteria, $con);
			}
		} else {
						if (!$this->isNew()) {
												

				$criteria->add(CommentsPeer::USER_ID, $this->getUid());

				CommentsPeer::addSelectColumns($criteria);
				if (!isset($this->lastCommentsCriteria) || !$this->lastCommentsCriteria->equals($criteria)) {
					$this->collCommentss = CommentsPeer::doSelect($criteria, $con);
				}
			}
		}
		$this->lastCommentsCriteria = $criteria;
		return $this->collCommentss;
	}

	
	public function countCommentss($criteria = null, $distinct = false, $con = null)
	{
				include_once 'lib/model/om/BaseCommentsPeer.php';
		if ($criteria === null) {
			$criteria = new Criteria();
		}
		elseif ($criteria instanceof Criteria)
		{
			$criteria = clone $criteria;
		}

		$criteria->add(CommentsPeer::USER_ID, $this->getUid());

		return CommentsPeer::doCount($criteria, $distinct, $con);
	}

	
	public function addComments(Comments $l)
	{
		$this->collCommentss[] = $l;
		$l->setUcMembers($this);
	}

	
	public function initTongs()
	{
		if ($this->collTongs === null) {
			$this->collTongs = array();
		}
	}

	
	public function getTongs($criteria = null, $con = null)
	{
				include_once 'lib/model/om/BaseTongPeer.php';
		if ($criteria === null) {
			$criteria = new Criteria();
		}
		elseif ($criteria instanceof Criteria)
		{
			$criteria = clone $criteria;
		}

		if ($this->collTongs === null) {
			if ($this->isNew()) {
			   $this->collTongs = array();
			} else {

				$criteria->add(TongPeer::HEAD_USER_ID, $this->getUid());

				TongPeer::addSelectColumns($criteria);
				$this->collTongs = TongPeer::doSelect($criteria, $con);
			}
		} else {
						if (!$this->isNew()) {
												

				$criteria->add(TongPeer::HEAD_USER_ID, $this->getUid());

				TongPeer::addSelectColumns($criteria);
				if (!isset($this->lastTongCriteria) || !$this->lastTongCriteria->equals($criteria)) {
					$this->collTongs = TongPeer::doSelect($criteria, $con);
				}
			}
		}
		$this->lastTongCriteria = $criteria;
		return $this->collTongs;
	}

	
	public function countTongs($criteria = null, $distinct = false, $con = null)
	{
				include_once 'lib/model/om/BaseTongPeer.php';
		if ($criteria === null) {
			$criteria = new Criteria();
		}
		elseif ($criteria instanceof Criteria)
		{
			$criteria = clone $criteria;
		}

		$criteria->add(TongPeer::HEAD_USER_ID, $this->getUid());

		return TongPeer::doCount($criteria, $distinct, $con);
	}

	
	public function addTong(Tong $l)
	{
		$this->collTongs[] = $l;
		$l->setUcMembers($this);
	}


	
	public function getTongsJoinScene($criteria = null, $con = null)
	{
				include_once 'lib/model/om/BaseTongPeer.php';
		if ($criteria === null) {
			$criteria = new Criteria();
		}
		elseif ($criteria instanceof Criteria)
		{
			$criteria = clone $criteria;
		}

		if ($this->collTongs === null) {
			if ($this->isNew()) {
				$this->collTongs = array();
			} else {

				$criteria->add(TongPeer::HEAD_USER_ID, $this->getUid());

				$this->collTongs = TongPeer::doSelectJoinScene($criteria, $con);
			}
		} else {
									
			$criteria->add(TongPeer::HEAD_USER_ID, $this->getUid());

			if (!isset($this->lastTongCriteria) || !$this->lastTongCriteria->equals($criteria)) {
				$this->collTongs = TongPeer::doSelectJoinScene($criteria, $con);
			}
		}
		$this->lastTongCriteria = $criteria;

		return $this->collTongs;
	}

	
	public function initTongMembers()
	{
		if ($this->collTongMembers === null) {
			$this->collTongMembers = array();
		}
	}

	
	public function getTongMembers($criteria = null, $con = null)
	{
				include_once 'lib/model/om/BaseTongMemberPeer.php';
		if ($criteria === null) {
			$criteria = new Criteria();
		}
		elseif ($criteria instanceof Criteria)
		{
			$criteria = clone $criteria;
		}

		if ($this->collTongMembers === null) {
			if ($this->isNew()) {
			   $this->collTongMembers = array();
			} else {

				$criteria->add(TongMemberPeer::USER_ID, $this->getUid());

				TongMemberPeer::addSelectColumns($criteria);
				$this->collTongMembers = TongMemberPeer::doSelect($criteria, $con);
			}
		} else {
						if (!$this->isNew()) {
												

				$criteria->add(TongMemberPeer::USER_ID, $this->getUid());

				TongMemberPeer::addSelectColumns($criteria);
				if (!isset($this->lastTongMemberCriteria) || !$this->lastTongMemberCriteria->equals($criteria)) {
					$this->collTongMembers = TongMemberPeer::doSelect($criteria, $con);
				}
			}
		}
		$this->lastTongMemberCriteria = $criteria;
		return $this->collTongMembers;
	}

	
	public function countTongMembers($criteria = null, $distinct = false, $con = null)
	{
				include_once 'lib/model/om/BaseTongMemberPeer.php';
		if ($criteria === null) {
			$criteria = new Criteria();
		}
		elseif ($criteria instanceof Criteria)
		{
			$criteria = clone $criteria;
		}

		$criteria->add(TongMemberPeer::USER_ID, $this->getUid());

		return TongMemberPeer::doCount($criteria, $distinct, $con);
	}

	
	public function addTongMember(TongMember $l)
	{
		$this->collTongMembers[] = $l;
		$l->setUcMembers($this);
	}


	
	public function getTongMembersJoinTong($criteria = null, $con = null)
	{
				include_once 'lib/model/om/BaseTongMemberPeer.php';
		if ($criteria === null) {
			$criteria = new Criteria();
		}
		elseif ($criteria instanceof Criteria)
		{
			$criteria = clone $criteria;
		}

		if ($this->collTongMembers === null) {
			if ($this->isNew()) {
				$this->collTongMembers = array();
			} else {

				$criteria->add(TongMemberPeer::USER_ID, $this->getUid());

				$this->collTongMembers = TongMemberPeer::doSelectJoinTong($criteria, $con);
			}
		} else {
									
			$criteria->add(TongMemberPeer::USER_ID, $this->getUid());

			if (!isset($this->lastTongMemberCriteria) || !$this->lastTongMemberCriteria->equals($criteria)) {
				$this->collTongMembers = TongMemberPeer::doSelectJoinTong($criteria, $con);
			}
		}
		$this->lastTongMemberCriteria = $criteria;

		return $this->collTongMembers;
	}

	
	public function initTongTopics()
	{
		if ($this->collTongTopics === null) {
			$this->collTongTopics = array();
		}
	}

	
	public function getTongTopics($criteria = null, $con = null)
	{
				include_once 'lib/model/om/BaseTongTopicPeer.php';
		if ($criteria === null) {
			$criteria = new Criteria();
		}
		elseif ($criteria instanceof Criteria)
		{
			$criteria = clone $criteria;
		}

		if ($this->collTongTopics === null) {
			if ($this->isNew()) {
			   $this->collTongTopics = array();
			} else {

				$criteria->add(TongTopicPeer::USER_ID, $this->getUid());

				TongTopicPeer::addSelectColumns($criteria);
				$this->collTongTopics = TongTopicPeer::doSelect($criteria, $con);
			}
		} else {
						if (!$this->isNew()) {
												

				$criteria->add(TongTopicPeer::USER_ID, $this->getUid());

				TongTopicPeer::addSelectColumns($criteria);
				if (!isset($this->lastTongTopicCriteria) || !$this->lastTongTopicCriteria->equals($criteria)) {
					$this->collTongTopics = TongTopicPeer::doSelect($criteria, $con);
				}
			}
		}
		$this->lastTongTopicCriteria = $criteria;
		return $this->collTongTopics;
	}

	
	public function countTongTopics($criteria = null, $distinct = false, $con = null)
	{
				include_once 'lib/model/om/BaseTongTopicPeer.php';
		if ($criteria === null) {
			$criteria = new Criteria();
		}
		elseif ($criteria instanceof Criteria)
		{
			$criteria = clone $criteria;
		}

		$criteria->add(TongTopicPeer::USER_ID, $this->getUid());

		return TongTopicPeer::doCount($criteria, $distinct, $con);
	}

	
	public function addTongTopic(TongTopic $l)
	{
		$this->collTongTopics[] = $l;
		$l->setUcMembers($this);
	}


	
	public function getTongTopicsJoinTong($criteria = null, $con = null)
	{
				include_once 'lib/model/om/BaseTongTopicPeer.php';
		if ($criteria === null) {
			$criteria = new Criteria();
		}
		elseif ($criteria instanceof Criteria)
		{
			$criteria = clone $criteria;
		}

		if ($this->collTongTopics === null) {
			if ($this->isNew()) {
				$this->collTongTopics = array();
			} else {

				$criteria->add(TongTopicPeer::USER_ID, $this->getUid());

				$this->collTongTopics = TongTopicPeer::doSelectJoinTong($criteria, $con);
			}
		} else {
									
			$criteria->add(TongTopicPeer::USER_ID, $this->getUid());

			if (!isset($this->lastTongTopicCriteria) || !$this->lastTongTopicCriteria->equals($criteria)) {
				$this->collTongTopics = TongTopicPeer::doSelectJoinTong($criteria, $con);
			}
		}
		$this->lastTongTopicCriteria = $criteria;

		return $this->collTongTopics;
	}

	
	public function initGallerys()
	{
		if ($this->collGallerys === null) {
			$this->collGallerys = array();
		}
	}

	
	public function getGallerys($criteria = null, $con = null)
	{
				include_once 'lib/model/om/BaseGalleryPeer.php';
		if ($criteria === null) {
			$criteria = new Criteria();
		}
		elseif ($criteria instanceof Criteria)
		{
			$criteria = clone $criteria;
		}

		if ($this->collGallerys === null) {
			if ($this->isNew()) {
			   $this->collGallerys = array();
			} else {

				$criteria->add(GalleryPeer::USER_ID, $this->getUid());

				GalleryPeer::addSelectColumns($criteria);
				$this->collGallerys = GalleryPeer::doSelect($criteria, $con);
			}
		} else {
						if (!$this->isNew()) {
												

				$criteria->add(GalleryPeer::USER_ID, $this->getUid());

				GalleryPeer::addSelectColumns($criteria);
				if (!isset($this->lastGalleryCriteria) || !$this->lastGalleryCriteria->equals($criteria)) {
					$this->collGallerys = GalleryPeer::doSelect($criteria, $con);
				}
			}
		}
		$this->lastGalleryCriteria = $criteria;
		return $this->collGallerys;
	}

	
	public function countGallerys($criteria = null, $distinct = false, $con = null)
	{
				include_once 'lib/model/om/BaseGalleryPeer.php';
		if ($criteria === null) {
			$criteria = new Criteria();
		}
		elseif ($criteria instanceof Criteria)
		{
			$criteria = clone $criteria;
		}

		$criteria->add(GalleryPeer::USER_ID, $this->getUid());

		return GalleryPeer::doCount($criteria, $distinct, $con);
	}

	
	public function addGallery(Gallery $l)
	{
		$this->collGallerys[] = $l;
		$l->setUcMembers($this);
	}

	
	public function initGalleryPhotoss()
	{
		if ($this->collGalleryPhotoss === null) {
			$this->collGalleryPhotoss = array();
		}
	}

	
	public function getGalleryPhotoss($criteria = null, $con = null)
	{
				include_once 'lib/model/om/BaseGalleryPhotosPeer.php';
		if ($criteria === null) {
			$criteria = new Criteria();
		}
		elseif ($criteria instanceof Criteria)
		{
			$criteria = clone $criteria;
		}

		if ($this->collGalleryPhotoss === null) {
			if ($this->isNew()) {
			   $this->collGalleryPhotoss = array();
			} else {

				$criteria->add(GalleryPhotosPeer::USER_ID, $this->getUid());

				GalleryPhotosPeer::addSelectColumns($criteria);
				$this->collGalleryPhotoss = GalleryPhotosPeer::doSelect($criteria, $con);
			}
		} else {
						if (!$this->isNew()) {
												

				$criteria->add(GalleryPhotosPeer::USER_ID, $this->getUid());

				GalleryPhotosPeer::addSelectColumns($criteria);
				if (!isset($this->lastGalleryPhotosCriteria) || !$this->lastGalleryPhotosCriteria->equals($criteria)) {
					$this->collGalleryPhotoss = GalleryPhotosPeer::doSelect($criteria, $con);
				}
			}
		}
		$this->lastGalleryPhotosCriteria = $criteria;
		return $this->collGalleryPhotoss;
	}

	
	public function countGalleryPhotoss($criteria = null, $distinct = false, $con = null)
	{
				include_once 'lib/model/om/BaseGalleryPhotosPeer.php';
		if ($criteria === null) {
			$criteria = new Criteria();
		}
		elseif ($criteria instanceof Criteria)
		{
			$criteria = clone $criteria;
		}

		$criteria->add(GalleryPhotosPeer::USER_ID, $this->getUid());

		return GalleryPhotosPeer::doCount($criteria, $distinct, $con);
	}

	
	public function addGalleryPhotos(GalleryPhotos $l)
	{
		$this->collGalleryPhotoss[] = $l;
		$l->setUcMembers($this);
	}


	
	public function getGalleryPhotossJoinGallery($criteria = null, $con = null)
	{
				include_once 'lib/model/om/BaseGalleryPhotosPeer.php';
		if ($criteria === null) {
			$criteria = new Criteria();
		}
		elseif ($criteria instanceof Criteria)
		{
			$criteria = clone $criteria;
		}

		if ($this->collGalleryPhotoss === null) {
			if ($this->isNew()) {
				$this->collGalleryPhotoss = array();
			} else {

				$criteria->add(GalleryPhotosPeer::USER_ID, $this->getUid());

				$this->collGalleryPhotoss = GalleryPhotosPeer::doSelectJoinGallery($criteria, $con);
			}
		} else {
									
			$criteria->add(GalleryPhotosPeer::USER_ID, $this->getUid());

			if (!isset($this->lastGalleryPhotosCriteria) || !$this->lastGalleryPhotosCriteria->equals($criteria)) {
				$this->collGalleryPhotoss = GalleryPhotosPeer::doSelectJoinGallery($criteria, $con);
			}
		}
		$this->lastGalleryPhotosCriteria = $criteria;

		return $this->collGalleryPhotoss;
	}

	
	public function initVisitRecords()
	{
		if ($this->collVisitRecords === null) {
			$this->collVisitRecords = array();
		}
	}

	
	public function getVisitRecords($criteria = null, $con = null)
	{
				include_once 'lib/model/om/BaseVisitRecordPeer.php';
		if ($criteria === null) {
			$criteria = new Criteria();
		}
		elseif ($criteria instanceof Criteria)
		{
			$criteria = clone $criteria;
		}

		if ($this->collVisitRecords === null) {
			if ($this->isNew()) {
			   $this->collVisitRecords = array();
			} else {

				$criteria->add(VisitRecordPeer::USER_ID, $this->getUid());

				VisitRecordPeer::addSelectColumns($criteria);
				$this->collVisitRecords = VisitRecordPeer::doSelect($criteria, $con);
			}
		} else {
						if (!$this->isNew()) {
												

				$criteria->add(VisitRecordPeer::USER_ID, $this->getUid());

				VisitRecordPeer::addSelectColumns($criteria);
				if (!isset($this->lastVisitRecordCriteria) || !$this->lastVisitRecordCriteria->equals($criteria)) {
					$this->collVisitRecords = VisitRecordPeer::doSelect($criteria, $con);
				}
			}
		}
		$this->lastVisitRecordCriteria = $criteria;
		return $this->collVisitRecords;
	}

	
	public function countVisitRecords($criteria = null, $distinct = false, $con = null)
	{
				include_once 'lib/model/om/BaseVisitRecordPeer.php';
		if ($criteria === null) {
			$criteria = new Criteria();
		}
		elseif ($criteria instanceof Criteria)
		{
			$criteria = clone $criteria;
		}

		$criteria->add(VisitRecordPeer::USER_ID, $this->getUid());

		return VisitRecordPeer::doCount($criteria, $distinct, $con);
	}

	
	public function addVisitRecord(VisitRecord $l)
	{
		$this->collVisitRecords[] = $l;
		$l->setUcMembers($this);
	}

} 